﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace RuoTeng.Windows.Forms
{
    public partial class HelpUpdate : RuoTengControl
    {
        public HelpUpdate()
        {
            this.CreatePictureBox(RuoTeng.Windows.Forms.Resources.Update, "pictureBox_HelpUpdate");
            InitializeComponent();
        }
     
        /// <summary>
        /// 点击 检测更新程序按钮事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button_update_check_Click(object sender, EventArgs e)
        { 
         
            if (System.IO.File.Exists("Update.exe"))
            {
                try
                {
                   System.Diagnostics.Process.Start("update");  ///如果目录下存在更新程序,启动更新程序
                }
                catch (Exception)
                {
                        MessageBox.Show("运行更新更新程序出错");

                }
             }
             else
             {
                 MessageBox.Show("当前目录下,找不到软件更新更新程序");
             }
        }

  
    }
}
